﻿namespace SalesPages.Infrastructure
{
    using DomainModel.ViewModel;
    using SalesPages.DomainModel.SearchCriteria;
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq.Expressions;

    public interface IBsaeRepertory<TEntity> where TEntity : class, new()
    {
        void Insert(TEntity entity);

        void Insert(IEnumerable<TEntity> entities);

        void Update(TEntity entity);
       
        void Delete(TEntity entity);

        void Delete(IEnumerable<TEntity> entities);

        void Delete(Expression<Func<TEntity, bool>> filterExpression);

        TEntity FindByKey(object key);

        List<TEntity> GetAll();

        IEnumerable<TEntity> Search(Expression<Func<TEntity, bool>> filterExpression);

        IPagedList<TEntity> Search(Expression<Func<TEntity, bool>> filterExpression, PageCondition pageCondition);

    }
}
